package com.etc.service.impl;

import java.sql.Connection;
import java.sql.SQLException;

import com.etc.dao.PersonDao;
import com.etc.dao.impl.PersonDaoImpl;
import com.etc.entity.Person;
import com.etc.service.PersonService;

public class PersonServiceImpl implements PersonService {

	private PersonDao personDao = new PersonDaoImpl();

	public void add(Person person) {
		personDao.add(person);
	}

	public boolean check(String account, String pwd) {
		return personDao.check(account, pwd);
	}

	public Person findByAccount(String account) {
		// TODO Auto-generated method stub
		return personDao.findByAccount(account);
	}
	public void modifyBalance(Connection conn,int id, double balance) throws SQLException{
		personDao.modifyBalance(conn, id, balance);
	}
	public Person findPersonById(int id){
		return personDao.findPersonById(id);
	}
}
